Integrand size = 29, antiderivative size = 58 \[ \int (a+b \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=\frac {1}{2} b (2 A+C) x+\frac {a A \text {arctanh}(\sin (c+d x))}{d}+\frac {a C \sin (c+d x)}{d}+\frac {b C \cos (c+d x) \sin (c+d x)}{2 d} \]
Time = 0.19 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.26 \[ \int (a+b \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=A b x+\frac {b C (c+d x)}{2 d}+\frac {a A \text {arctanh}(\sin (c+d x))}{d}+\frac {a C \cos (d x) \sin (c)}{d}+\frac {a C \cos (c) \sin (d x)}{d}+\frac {b C \sin (2 (c+d x))}{4 d} \]
A*b*x + (b*C*(c + d*x))/(2*d) + (a*A*ArcTanh[Sin[c + d*x]])/d + (a*C*Cos[d *x]*Sin[c])/d + (a*C*Cos[c]*Sin[d*x])/d + (b*C*Sin[2*(c + d*x)])/(4*d)
Time = 0.50 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.07, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.276, Rules used = {3042, 3513, 3042, 3502, 3042, 3214, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec (c+d x) (a+b \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (A+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 3513 |
\(\displaystyle \frac {1}{2} \int \left (2 a C \cos ^2(c+d x)+b (2 A+C) \cos (c+d x)+2 a A\right ) \sec (c+d x)dx+\frac {b C \sin (c+d x) \cos (c+d x)}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \int \frac {2 a C \sin \left (c+d x+\frac {\pi }{2}\right )^2+b (2 A+C) \sin \left (c+d x+\frac {\pi }{2}\right )+2 a A}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {b C \sin (c+d x) \cos (c+d x)}{2 d}\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {1}{2} \left (\int (2 a A+b (2 A+C) \cos (c+d x)) \sec (c+d x)dx+\frac {2 a C \sin (c+d x)}{d}\right )+\frac {b C \sin (c+d x) \cos (c+d x)}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (\int \frac {2 a A+b (2 A+C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {2 a C \sin (c+d x)}{d}\right )+\frac {b C \sin (c+d x) \cos (c+d x)}{2 d}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle \frac {1}{2} \left (2 a A \int \sec (c+d x)dx+\frac {2 a C \sin (c+d x)}{d}+b x (2 A+C)\right )+\frac {b C \sin (c+d x) \cos (c+d x)}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (2 a A \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {2 a C \sin (c+d x)}{d}+b x (2 A+C)\right )+\frac {b C \sin (c+d x) \cos (c+d x)}{2 d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {1}{2} \left (\frac {2 a A \text {arctanh}(\sin (c+d x))}{d}+\frac {2 a C \sin (c+d x)}{d}+b x (2 A+C)\right )+\frac {b C \sin (c+d x) \cos (c+d x)}{2 d}\) |
(b*C*Cos[c + d*x]*Sin[c + d*x])/(2*d) + (b*(2*A + C)*x + (2*a*A*ArcTanh[Si n[c + d*x]])/d + (2*a*C*Sin[c + d*x])/d)/2
3.6.25.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[ (-C)*d*Cos[e + f*x]*Sin[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 3) )), x] + Simp[1/(b*(m + 3)) Int[(a + b*Sin[e + f*x])^m*Simp[a*C*d + A*b*c *(m + 3) + b*d*(C*(m + 2) + A*(m + 3))*Sin[e + f*x] - (2*a*C*d - b*c*C*(m + 3))*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, C, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && !LtQ[m, -1]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 3.06 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.12
method | result | size |
derivativedivides | \(\frac {a A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+a \sin \left (d x +c \right ) C +A b \left (d x +c \right )+C b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(65\) |
default | \(\frac {a A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+a \sin \left (d x +c \right ) C +A b \left (d x +c \right )+C b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(65\) |
parallelrisch | \(\frac {-4 a A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+4 a A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+b \sin \left (2 d x +2 c \right ) C +4 a \sin \left (d x +c \right ) C +4 x b \left (A +\frac {C}{2}\right ) d}{4 d}\) | \(71\) |
parts | \(\frac {a A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {A b \left (d x +c \right )}{d}+\frac {a C \sin \left (d x +c \right )}{d}+\frac {C b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(73\) |
risch | \(b x A +\frac {b C x}{2}-\frac {i a C \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {i a C \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {a A \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}-\frac {a A \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}+\frac {\sin \left (2 d x +2 c \right ) C b}{4 d}\) | \(100\) |
norman | \(\frac {\left (A b +\frac {1}{2} C b \right ) x +\left (A b +\frac {1}{2} C b \right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (3 A b +\frac {3}{2} C b \right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (3 A b +\frac {3}{2} C b \right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {C \left (2 a -b \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {C \left (2 a +b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {4 a C \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {a A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {a A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(191\) |
1/d*(a*A*ln(sec(d*x+c)+tan(d*x+c))+a*sin(d*x+c)*C+A*b*(d*x+c)+C*b*(1/2*cos (d*x+c)*sin(d*x+c)+1/2*d*x+1/2*c))
Time = 0.28 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.09 \[ \int (a+b \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=\frac {{\left (2 \, A + C\right )} b d x + A a \log \left (\sin \left (d x + c\right ) + 1\right ) - A a \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (C b \cos \left (d x + c\right ) + 2 \, C a\right )} \sin \left (d x + c\right )}{2 \, d} \]
1/2*((2*A + C)*b*d*x + A*a*log(sin(d*x + c) + 1) - A*a*log(-sin(d*x + c) + 1) + (C*b*cos(d*x + c) + 2*C*a)*sin(d*x + c))/d
\[ \int (a+b \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=\int \left (A + C \cos ^{2}{\left (c + d x \right )}\right ) \left (a + b \cos {\left (c + d x \right )}\right ) \sec {\left (c + d x \right )}\, dx \]
Time = 0.20 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.09 \[ \int (a+b \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=\frac {4 \, {\left (d x + c\right )} A b + {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C b + 4 \, A a \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 4 \, C a \sin \left (d x + c\right )}{4 \, d} \]
1/4*(4*(d*x + c)*A*b + (2*d*x + 2*c + sin(2*d*x + 2*c))*C*b + 4*A*a*log(se c(d*x + c) + tan(d*x + c)) + 4*C*a*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 127 vs. \(2 (54) = 108\).
Time = 0.31 (sec) , antiderivative size = 127, normalized size of antiderivative = 2.19 \[ \int (a+b \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=\frac {2 \, A a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 2 \, A a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + {\left (2 \, A b + C b\right )} {\left (d x + c\right )} + \frac {2 \, {\left (2 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \]
1/2*(2*A*a*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 2*A*a*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + (2*A*b + C*b)*(d*x + c) + 2*(2*C*a*tan(1/2*d*x + 1/2*c)^3 - C*b*tan(1/2*d*x + 1/2*c)^3 + 2*C*a*tan(1/2*d*x + 1/2*c) + C*b*tan(1/2*d *x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^2)/d
Time = 2.04 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.98 \[ \int (a+b \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=\frac {C\,a\,\sin \left (c+d\,x\right )}{d}+\frac {2\,A\,a\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,A\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {C\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {C\,b\,\sin \left (2\,c+2\,d\,x\right )}{4\,d} \]